import React, { PureComponent } from 'react';
import { Row, Card, Col, Button, Table, Divider, Popconfirm, Descriptions } from 'antd';
import moment from 'moment';
import { connect } from 'dva';
import router from 'umi/router';
import Ellipsis from '@/components/Ellipsis';

@connect()
class ProjectContactCheck extends PureComponent {
  constructor(props) {
    super(props);
    this.state = {};
    this.dispatch = this.props.dispatch;
    this.state = this.props.location.state;
  }

  componentDidMount() {}
  render() {
    const width = '200px';
    return (
      <>
        <Card
          title={
            <span style={{ borderLeft: '4px solid #3CB371', paddingLeft: '10px' }}>
              工程联系单详情
              <Divider type="vertical" />
              <span>NO：{this.state.bh}</span>
            </span>
          }
          style={{ margin: '10px' }}
        >
          {/* <table border="1" cellspacing="0">
                <tr>
                <td>January</td>
                    <td>$100</td>
                </tr>
                <tr>
                    <td>January</td>
                    <td>$100</td>
                </tr>
            </table> */}
          <Descriptions bordered column={4} style={{ width: '70%' }}>
            <Descriptions.Item label="工程名称" span={2}>
              {this.state.gcmc}
            </Descriptions.Item>
            <Descriptions.Item label="施工单位" span={2}>
              {this.state.sgdwmc}
            </Descriptions.Item>
            <Descriptions.Item label="主送单位" span={2}>
              {this.state.csdwmc}
            </Descriptions.Item>
            <Descriptions.Item label="抄送单位" span={2}>
              {this.state.csdwmc2}
            </Descriptions.Item>
            <Descriptions.Item label="联系提要" span={4}>
              {this.state.lxty}
            </Descriptions.Item>
            <Descriptions.Item label="联系内容" span={4}>
              {<div dangerouslySetInnerHTML={{ __html: this.state.lxnr }} />}
            </Descriptions.Item>
            <Descriptions.Item label="日期" span={4}>
              {this.state.sbsj ? moment(this.state.sbsj).format('YYYY-MM-DD') : null}
            </Descriptions.Item>
            <Descriptions.Item label="审批内容" span={4}>
              {<div dangerouslySetInnerHTML={{ __html: this.state.spnr }} />}
            </Descriptions.Item>
            <Descriptions.Item label="审批单位" span={2}>
              {this.state.spdwmc}
            </Descriptions.Item>
            <Descriptions.Item label="审批人" span={2}>
              {this.state.sprymc}
            </Descriptions.Item>
            {/* <Descriptions.Item label="报修时间" span={2}>
              {this.record.ApplyTime ? moment(this.record.ApplyTime).format('YYYY-MM-DD') : null}
            </Descriptions.Item>
            <Descriptions.Item label="损坏原因" span={2}>
              <Ellipsis length={40} tooltip>
                {this.record.MaintainCause}
              </Ellipsis>
            </Descriptions.Item>
            <Descriptions.Item label="维护内容" span={2}>
              <Ellipsis length={40} tooltip>
                {this.record.MaintainContent}
              </Ellipsis>
            </Descriptions.Item>
            <Descriptions.Item label="拟处理意见" span={4}>
              <Ellipsis length={40} tooltip>
                {this.record.MaintainAdvice}
              </Ellipsis>
            </Descriptions.Item>
            <Descriptions.Item label="维修单位" span={2}>
              {this.record.MaintainGroup}
            </Descriptions.Item>
            <Descriptions.Item label="责任人" span={2}>
              {this.record.MaintainPerson}
            </Descriptions.Item>
            <Descriptions.Item label="处理意见（期限要求）" span={4}>
              <Ellipsis length={40} tooltip>
                {this.record.ApproveAdvice}
              </Ellipsis>
            </Descriptions.Item>
            <Descriptions.Item label="分管领导" span={2}>
              {this.record.ApprovePerson}
            </Descriptions.Item>
            <Descriptions.Item label="审批时间" span={2}>
              {this.record.ApproveTime
                ? moment(this.record.ApproveTime).format('YYYY-MM-DD')
                : null}
            </Descriptions.Item>
            <Descriptions.Item label="中间验收抽查内容" span={4}>
              <Ellipsis length={40} tooltip>
                {this.record.InspectContent}
              </Ellipsis>
            </Descriptions.Item>

            <Descriptions.Item label="抽查人员" span={2}>
              {this.record.InspectPerson}
            </Descriptions.Item>
            <Descriptions.Item label="抽查时间" span={2}>
              {this.record.InspectTime
                ? moment(this.record.InspectTime).format('YYYY-MM-DD')
                : null}
            </Descriptions.Item>

            <Descriptions.Item label="完成情况" span={4}>
              <Ellipsis length={40} tooltip>
                {this.record.CompleteContent}
              </Ellipsis>
            </Descriptions.Item>
            <Descriptions.Item label="备注" span={2}>
              <Ellipsis length={40} tooltip>
                {this.record.CompleteRemark}
              </Ellipsis>
            </Descriptions.Item>
            <Descriptions.Item label="完成时间" span={2}>
              {this.record.CompleteTime
                ? moment(this.record.CompleteTime).format('YYYY-MM-DD')
                : null}
            </Descriptions.Item>

            <Descriptions.Item label="监理单位验收意见" span={4}>
              <Ellipsis length={40} tooltip>
                {this.record.AcceptContent}
              </Ellipsis>
            </Descriptions.Item>

            <Descriptions.Item label="验收人员" span={2}>
              {this.record.AcceptPerson}
            </Descriptions.Item>
            <Descriptions.Item label="验收时间" span={2}>
              {this.record.AcceptTime ? moment(this.record.AcceptTime).format('YYYY-MM-DD') : null}
            </Descriptions.Item>

            <Descriptions.Item label="管理部门检查情况" span={4}>
              <Ellipsis length={40} tooltip>
                {this.record.CheckContent}
              </Ellipsis>
            </Descriptions.Item>

            <Descriptions.Item label="检查人员" span={2}>
              {this.record.CheckPerson}
            </Descriptions.Item>
            <Descriptions.Item label="检查时间" span={2}>
              {this.record.CheckTime ? moment(this.record.CheckTime).format('YYYY-MM-DD') : null}
            </Descriptions.Item> */}
          </Descriptions>
        </Card>
      </>
    );
  }
}

export default ProjectContactCheck;
